import searchSection from './searchSection';
import infoSection from './infoSection';
import loading from './loading';
import Emitter from './eventBus';
const content = {
  template:
  `
  <div>
    <whois-search-section 
      :class="{shrink: isSuccess}"
    ></whois-search-section>
    <whois-info-section v-show="isSuccess"></whois-info-section>
    <loading :class="{show: isLoading}"></loading>
  </div>
  `,
  components: {
    'whois-search-section': searchSection,
    'whois-info-section': infoSection,
    'loading': loading
  },
  data: function(){
    return {
      isSuccess: false,
      isLoading: false
    }
  },
  mounted(){
    Emitter.$on('isShrink', (param)=>{
      this.isSuccess = param;
    })
    Emitter.$on('gettingData', (param)=>{
      this.isLoading = param;
    })
  }
}
module.exports = content;